/*
 * Page: 关于我们
 * Author: Truexin
 * Date: 2016/11/21
 *
 * ReviseAuthor: ''
 * ReviseDate: ''
 */

(function () {

    $(".icon-back-to-top").on('click',function () {
        $("html, body").animate({
            scrollTop: '0px'
        }, 1000);
    });

    if(screen.availWidth > 450){
        $('.is-about').hover(()=> {
            $('.intap').show()
        },()=> {
            $('.intap').hide()
        });

        $('.intap').hover(()=> {
            $('.intap').show()
        },()=> {
            $('.intap').hide()
        });
    }

    $(".target").on("click", function () {
        let catid = $(this).attr("data-i"),
            top = $(".about .title[data-i='" + catid + "']").offset().top;
        $("html, body").animate({
            scrollTop: (top - 10)
        }, 1000);
    });
    
})();
